﻿@model DHQGHN.PM2.Models.Online.TinhTrangHonNhanModel

<style>
    .ui-tooltip, .arrow:after {
        background: #FAFAD2;
    }

    .ui-tooltip {
        color: black;
        font-size: 12px;
    }

    .arrow {
        width: 70px;
        height: 16px;
        overflow: hidden;
        position: absolute;
        left: 50%;
        margin-left: -35px;
        bottom: -16px;
    }

        .arrow.top {
            top: -16px;
            bottom: auto;
        }

        .arrow.left {
            left: 20%;
        }

        .arrow:after {
            content: "";
            position: absolute;
            left: 20px;
            top: -20px;
            width: 25px;
            height: 25px;
            box-shadow: 6px 5px 9px -9px black;
            -webkit-transform: rotate(45deg);
            -ms-transform: rotate(45deg);
            transform: rotate(45deg);
        }

        .arrow.top:after {
            bottom: -20px;
            top: auto;
        }
</style>
<script>
    @functions{
        public string GetAntiForgeryToken()
        {
            string cookieToken, formToken;
            AntiForgery.GetTokens(null, out cookieToken, out formToken);
            return cookieToken + "," + formToken;
        }
    };
    $('.mnResident #mainForm').setMask("Đang thực hiện...");
    $(document).ready(function () {
        Tooltip();
        key = $("#MARITAL_STATUS_ID").val();
        var dem = 0;
        var total = 1;
        if (key == '2') {
            total = 3;
        }
        $("#MARRIAGE_REG_DAY").mask("99/99/9999", { placeholder: "dd/MM/yyyy" });
        Checkngay("DAYSP");
        Checkthang("MONTHSP");
        Checknam("YEARSP");
        Checkngay("DAYMR");
        Checkthang("MONTHMR");
        Checknam("YEARMR");
        Checkcmnd("SPOUSES_IDCARD_NUM");
        codemr = $("#CODEMR").val();
        tinhmr = $("#CODEMR").val().substring(0, 2);
        huyenmr = $("#CODEMR").val().substring(0, 5);
        codesp = $("#CODESP").val();
        tinhsp = $("#CODESP").val().substring(0, 2);
        huyensp = $("#CODESP").val().substring(0, 5);
        if (codemr != "") {
            $("#TINHMR").val(tinhmr);
            total++;
        }
        if ($("#TINHMR").val() != "-1") {
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")', // we are calling json method
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#TINHMR").val(),
                    level: '2'
                },
                success: function (states) {
                    $("#HUYENMR").append('<option value="' + '-1' + '">' +
                '-- Chọn Huyện --' + '</option>');
                    $.each(states, function (i, state) {
                        $("#HUYENMR").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');
                    });

                },
                complete: function () {
                    $("#HUYENMR").val(huyenmr);
                    $("#XAMR").empty();
                    $("#XAMR").append('<option value="' + '-1' + '">' +
                        '-- Chọn Xã --' + '</option>');
                    $.ajax({
                        type: 'POST',
                        url: '@Url.Action("GetAdministrativeUnit1")',
                        headers: {
                            'VerificationToken': '@GetAntiForgeryToken()'
                        },
                        dataType: 'json',

                        data: {
                            code: $("#HUYENMR").val(),
                            level: '3'
                        },

                        success: function (states) {
                            $.each(states, function (i, state) {
                                $("#XAMR").append('<option value="' + state.Value + '">' +
                                    state.Text + '</option>');
                            });

                        },
                        complete: function () {
                            $("#XAMR").val(codemr);
                            dem++;
                            checkloading(dem, total);
                        },
                        error: function (ex) {
                            alert('Failed to retrieve states.' + ex);
                        }
                    });
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
        } else {
            $("#HUYENMR").append('<option value="' + '-1' + '">' +
                '-- Chọn Huyện --' + '</option>');
            $("#XAMR").append('<option value="' + '-1' + '">' +
                 '-- Chọn Xã --' + '</option>');
        }
        if (codesp != "") {
            $("#TINHSP").val(tinhsp);
            total++;
        }
        if ($("#TINHSP").val() != "-1") {
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")',
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#TINHSP").val(),
                    level: '2'
                },
                success: function (states) {
                    $("#HUYENSP").append('<option value="' + '-1' + '">' +
                '-- Chọn Huyện --' + '</option>');
                    $.each(states, function (i, state) {
                        $("#HUYENSP").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');
                    });

                },
                complete: function () {
                    $("#HUYENSP").val(huyensp);
                    $("#XASP").empty();
                    $("#XASP").append('<option value="' + '-1' + '">' +
                        '-- Chọn Xã --' + '</option>');
                    $.ajax({
                        type: 'POST',
                        url: '@Url.Action("GetAdministrativeUnit1")',
                        headers: {
                            'VerificationToken': '@GetAntiForgeryToken()'
                        },
                        dataType: 'json',

                        data: {
                            code: $("#HUYENSP").val(),
                            level: '3'
                        },
                        success: function (states) {
                            $.each(states, function (i, state) {
                                $("#XASP").append('<option value="' + state.Value + '">' +
                                    state.Text + '</option>');
                            });

                        },
                        complete: function () {
                            $("#XASP").val(codesp);
                            dem++;
                            checkloading(dem, total);
                        },
                        error: function (ex) {
                            alert('Failed to retrieve states.' + ex);
                        }
                    });
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
        }
        else {
            $("#HUYENSP").append('<option value="' + '-1' + '">' +
                '-- Chọn Huyện --' + '</option>');
            $("#XASP").append('<option value="' + '-1' + '">' +
                 '-- Chọn Xã --' + '</option>');
        }

        $(".MARITAL_STATUS_ID").change(function () {

            key = $(".MARITAL_STATUS_ID").val();
            $("#SPOUSES_LNAME").val('');
            $("#SPOUSES_MNAME").val('');
            $("#SPOUSES_FNAME").val('');
            $(".SPOUSES_COUNTRY_ID").val('');
            $("#XASP").val('');
            $(".SPOUSES_ETHNIC_ID").val('');
            $("#SPOUSES_IDCARD_NUM").val('');
            $("#MARRIAGE_REG_NUM").val('');
            $("#XAMR").val('');
            $("#DAYSP").val('');
            $("#MONTHSP").val('');
            $("#YEARSP").val('');
            $("#DAYMR").val('');
            $("#MONTHMR").val('');
            $("#YEARMR").val('');
            $("#TINHMR").val('-1');
            $("#HUYENMR").val('');
            $("#XAMR").val('');
            $("#TINHSP").val('-1');
            $("#HUYENSP").val('');
            $("#XASP").val('');
            if (key == "1" || key == "0" || key == "3") {
                $(".dakethon").hide();
                $(".thongtin").hide();
                $("#tt1").hide();
                $("#tt2").hide();
            }
            if (key == "2") {
                $(".dakethon").show();
                $(".thongtin").show();
                $("#tt1").show();
                $("#tt2").hide();
                $("#HUYENMR").val("-1");
                $("#XAMR").val("-1");
                $("#HUYENSP").val("-1");
                $("#XASP").val("-1");
                $("#MARITAL_STATUS_ID").val("2");

            }
            if (key == "") {
                $(".dakethon").hide();
                $(".thongtin").hide();
                $("#tt1").hide();
                $("#tt2").hide();

            }

        });
        if (key == "1" || key == "0" || key == "3") {
            $(".dakethon").hide();
            $(".thongtin").hide();
            $("#tt1").hide();
            $("#tt2").hide();
        }
        if (key == "2") {
            $(".dakethon").show(); 
            $(".thongtin").show();
            $("#tt1").show();
            $("#tt2").hide();

        }
        if (key == "") {
            $(".dakethon").hide();
            $(".thongtin").hide();
            $("#tt1").hide();
            $("#tt2").hide();
        }


        $("#TINHMR").change(function () {
            $("#HUYENMR").empty();
            $("#XAMR").empty();
            $("#HUYENMR").append('<option value="' + '-1' + '">' +
                 '-- Chọn Huyện --' + '</option>');
            $("#XAMR").append('<option value="' + '-1' + '">' +
                 '-- Chọn Xã --' + '</option>');
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")',
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#TINHMR").val(),
                    level: '2'
                },
                success: function (states) {
                    $.each(states, function (i, state) {
                        $("#HUYENMR").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');
                    });

                },
                complete: function (states) {
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
            return false;
        })
        $("#HUYENMR").change(function () {
            $("#divLoading").show();
            $("#XAMR").empty();
            $("#XAMR").append('<option value="' + '-1' + '">' +
                '-- Chọn Xã --' + '</option>');
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")',
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#HUYENMR").val(),
                    level: '3'
                },
                success: function (states) {
                    $.each(states, function (i, state) {
                        $("#XAMR").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');

                    });

                },
                complete: function () {
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
            return false;
        });

        $("#TINHSP").change(function () {
            $("#divLoading").show();
            $("#HUYENSP").empty();
            $("#XASP").empty();
            $("#HUYENSP").append('<option value="' + '-1' + '">' +
                 '-- Chọn Huyện --' + '</option>');
            $("#XASP").append('<option value="' + '-1' + '">' +
                 '-- Chọn Xã --' + '</option>');
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")',
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#TINHSP").val(),
                    level: '2'
                },
                success: function (states) {
                    $.each(states, function (i, state) {
                        $("#HUYENSP").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');
                    });

                },
                complete: function (states) {
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
            return false;
        })
        $("#HUYENSP").change(function () {
            $("#divLoading").show();
            $("#XASP").empty();
            $("#XASP").append('<option value="' + '-1' + '">' +
                '-- Chọn Xã --' + '</option>');
            $.ajax({
                type: 'POST',
                url: '@Url.Action("GetAdministrativeUnit1")',
                headers: {
                    'VerificationToken': '@GetAntiForgeryToken()'
                },
                dataType: 'json',

                data: {
                    code: $("#HUYENSP").val(),
                    level: '3'
                },
                success: function (states) {
                    $.each(states, function (i, state) {
                        $("#XASP").append('<option value="' + state.Value + '">' +
                             state.Text + '</option>');
                    });

                },
                complete: function () {
                },
                error: function (ex) {
                    alert('Failed to retrieve states.' + ex);
                }
            });
            return false;
        });
        $.ajax({
            url: '@Url.Action("GetAllByListName")',
            dataType: 'json',
            headers: {
                'VerificationToken': '@GetAntiForgeryToken()'
            },
            method: 'GET',
            data: { 'tablename': 'MARITAL_STATUS' },
            success: function (data, textStatus, jqXHR) {
                $(".MARITAL_STATUS_ID").append('<option value="">' +
             ' Chọn Tình trạng hôn nhân ' + '</option>');
                $.each(data, function (i, item) {
                    $(".MARITAL_STATUS_ID").append('<option value="' + item.CodeID + '">' +
                         item.Name + '</option>');
                });
                $(".MARITAL_STATUS_ID").val("@Model.MARITAL_STATUS_ID");
            },
            complete: function () {
                dem++;
                checkloading(dem, total);
            }

        });
        $.ajax({
            url: '@Url.Action("GetAllByListName")',
            dataType: 'json',
            headers: {
                'VerificationToken': '@GetAntiForgeryToken()'
            },
            method: 'GET',
            data: { 'tablename': 'COUNTRY' },
            success: function (data, textStatus, jqXHR) {
                $(".SPOUSES_COUNTRY_ID").append('<option value="">' +
              '-- Chọn Quốc tịch --' + '</option>');
                $.each(data, function (i, item) {
                    $(".SPOUSES_COUNTRY_ID").append('<option value="' + item.CodeID + '">' +
                         item.Name + '</option>');
                });
                $(".SPOUSES_COUNTRY_ID").val("@Model.SPOUSES_COUNTRY_ID");
            },
            complete: function () {
                dem++;
                checkloading(dem, total);
            }

        });
        $.ajax({
            url: '@Url.Action("GetAllByListName")',
            dataType: 'json',
            headers: {
                'VerificationToken': '@GetAntiForgeryToken()'
            },
            method: 'GET',
            data: { 'tablename': 'ETHNIC' },
            success: function (data, textStatus, jqXHR) {
                $(".SPOUSES_ETHNIC_ID").append('<option value="">' +
           '-- Chọn Dân tộc --' + '</option>');
                $.each(data, function (i, item) {
                    $(".SPOUSES_ETHNIC_ID").append('<option value="' + item.CodeID + '">' +
                         item.Name + '</option>');
                });
                $(".SPOUSES_ETHNIC_ID").val("@Model.SPOUSES_ETHNIC_ID");
            },
            complete: function () {
                dem++;
                checkloading(dem, total);
            }

        });
    });
    function ClickButton(Next) {
        var ngaysp = $("#DAYSP").val();
        var thangsp = $("#MONTHSP").val();
        var namsp = $("#YEARSP").val();
        var ngaymr = $("#DAYMR").val();
        var thangmr = $("#MONTHMR").val();
        var nammr = $("#YEARMR").val();
        xasp = $("#XASP").val();
        if (xasp == "-1") {
            xasp = "";
        }
        xamr = $("#XAMR").val();
        if (xamr == "-1") {
            xamr = "";
        }
        var dataSend = {
            'RESIDENT_ID': $('#selectMenu').val(),
            'MARITAL_STATUS_ID': $(".MARITAL_STATUS_ID").val(),
            'SPOUSES_LNAME': $("#SPOUSES_LNAME").val(),
            'SPOUSES_MNAME': $("#SPOUSES_MNAME").val(),
            'SPOUSES_FNAME': $("#SPOUSES_FNAME").val(),
            'SPOUSES_DOB': namsp + thangsp + ngaysp,
            'SPOUSES_COUNTRY_ID': $(".SPOUSES_COUNTRY_ID").val(),
            'SPOUSES_RPOB_ADM_UNIT_ID': xasp,
            'SPOUSES_ETHNIC_ID': $(".SPOUSES_ETHNIC_ID").val(),
            'SPOUSES_IDCARD_NUM': $("#SPOUSES_IDCARD_NUM").val(),
            'MARRIAGE_REG_DAY': nammr + thangmr + ngaymr,
            'MARRIAGE_REG_NUM': $("#MARRIAGE_REG_NUM").val(),
            'MRE_REG_ADM_UNIT_ID': xamr,
            'DIV_REG_NUM': $("#DIV_REG_NUM").val(),
            'DIV_REG_BOOK_NUM': $("#DIV_REG_BOOK_NUM").val(),
            'DIV_COURT_ID': $(".DIV_COURT_ID").val(),
            'DIV_REG_DAY': '0',
            'NEXT': Next,
        };
        var jqXHR = $.ajax({
            url: '@Url.Action("TinhTrangHonNhanNew","Online")',
            dataType: 'html',
            headers: {
                'VerificationToken': '@GetAntiForgeryToken()'
            },
            method: 'post',
            cache: false,
            data: dataSend,
            success: function myfunctionSuccess(data, textStatus, jqXHR) {
                if (Next != '2') {
                    $('#mainForm').html(data);
                } else {
                    window.location.href = '@Url.Action("Login","Online")';
                }
            },
            complete: function (jqXHR, textStatus) {
                if (Next == '1') {
                    $('#thongtin').text("THÔNG TIN THƯỜNG TRÚ");
                } else {
                    $('#thongtin').text("THÔNG TIN NGƯỜI ĐẠI DIỆN");
                }
            },
            error: function (jqXHR, textStatus, errorThrown) {
                alert('Có lỗi xảy ra trong quá trình lưu thông tin: ' + errorThrown);
            },

        });
    }
    $("#btnNext").click(function (event, giatri) {
        if (checkhtml()) {
            alert("Dữ liệu nhập không được có ký tự '<' ở đầu.");
        } else {
            if (giatri != null) {
                ClickButton(giatri);
            }
            else {
                if (key == "2") {
                    if (Checkdatetime("DAYMR", "MONTHMR", "YEARMR") == 0 && Checkdatetime("DAYSP", "MONTHSP", "YEARSP") == 0) {
                        $('.mnResident #mainForm').setMask("Đang thực hiện...");
                        ClickButton(1);
                    }
                }
                else {
                    $('.mnResident #mainForm').setMask("Đang thực hiện...");
                    ClickButton(1);
                }

            }
        }
    });
    $("#btnBack").click(function () {
        if (checkhtml()) {
            alert("Dữ liệu nhập không được có ký tự '<' ở đầu.");
        } else {
            $('.mnResident #mainForm').setMask("Đang thực hiện...");
            ClickButton(0);
        }
    });

</script>
<div class="row margin-top-20">
    <div class="col-md-6">
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Tình trạng hôn nhân</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                <select class="MARITAL_STATUS_ID form-control "></select>
            </div>
        </div>
    </div>
</div>
<div class="row margin-top-20" style="margin-top: 1px !important;">
    <div class="col-md-6">
        <div class="dakethon">
            <div class="form-group">
                <label class="control-label col-md-5 col-sm-4 col-xs-5">Số ĐK kết hôn</label>
                <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                    @Html.TextBoxFor(model => model.MARRIAGE_REG_NUM, new { @class = "form-control ", MaxLength = 25 })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-5 col-sm-4 col-xs-5">Ngày ĐK kết hôn</label>
                <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                    @Html.TextBoxFor(model => model.DAYMR, new { @class = "form-control", style = "width: 25%; display: inline;padding-left:4%;", MaxLength = 2, @title = @Html.ToolTipMessageFor(m => m.DAYMR) })/@Html.TextBoxFor(model => model.MONTHMR, new { @class = "form-control", style = "width: 25%; display: inline;padding-left:1%;", MaxLength = 2, @title = @Html.ToolTipMessageFor(m => m.MONTHMR) })/@Html.TextBoxFor(model => model.YEARMR, new { @class = "form-control", style = "width: 40%; display: inline;padding-left:1%;", MaxLength = 4, @title = @Html.ToolTipMessageFor(m => m.YEARMR) })
                </div>
            </div>

        </div>

    </div>

    <div class="col-md-6">
        <div class="dakethon">
            <div class="form-group">
                <label class="control-label col-md-5 col-sm-4 col-xs-5">Nơi ĐK kết hôn</label>
                <div class="col-md-7 col-sm-8 col-xs-7">
                    @Html.DropDownList("TINHMR", ViewData["DISTRICT_CODE"] as List<SelectListItem>, new { @class = "form-control ", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Tỉnh." })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-5 col-sm-4 col-xs-5"></label>
                <div class="col-md-7 col-sm-8 col-xs-7">
                    @Html.DropDownList("HUYENMR", new SelectList(string.Empty, "Value", "Text"), new { @class = "form-control", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Huyện." })
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-md-5 col-sm-4 col-xs-5"></label>
                <div class="col-md-7 col-sm-8 col-xs-7">
                    @Html.DropDownList("XAMR", new SelectList(string.Empty, "Value", "Text"), new { @class = "form-control", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Xã." })
                </div>
            </div>
        </div>

    </div>

    <div>
        @Html.HiddenFor(model => model.MARITAL_STATUS_ID)
        @Html.HiddenFor(model => model.CODEMR)
        @Html.HiddenFor(model => model.CODESP)
    </div>
</div>
<div class="row margin-top-20" style="margin-top: 1px !important;">
    <div class="col-md-6">
        <div class="login-fields2" id="tt1">
            <p style="float: left; padding-right: 5px; vertical-align: top;">
                <img src="../Images/rt_arrow.gif">
            <p>Thông tin vợ/chồng:</p>
        </div>
    </div>
</div>
<div class=" row margin-top-20 thongtin" style="margin-top: 1px !important;">
    <div class="col-md-6">
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Họ</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                @Html.TextBoxFor(model => model.SPOUSES_LNAME, new { @class = "form-control ", MaxLength = 50 })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Tên đệm</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                @Html.TextBoxFor(model => model.SPOUSES_MNAME, new { @class = "form-control ", MaxLength = 50 })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Tên khai sinh</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                @Html.TextBoxFor(model => model.SPOUSES_FNAME, new { @class = "form-control ", MaxLength = 50 })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Ngày sinh</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                @Html.TextBoxFor(model => model.DAYSP, new { @class = "form-control", style = "width: 25%; display: inline;padding-left: 4%;", MaxLength = 2, @title = @Html.ToolTipMessageFor(m => m.DAYSP) })/@Html.TextBoxFor(model => model.MONTHSP, new { @class = "form-control", style = "width: 25%; display: inline;padding-left: 1%;", MaxLength = 2, @title = @Html.ToolTipMessageFor(m => m.MONTHSP) })/@Html.TextBoxFor(model => model.YEARSP, new { @class = "form-control", style = "width: 40%; display: inline;padding-left:1%;", MaxLength = 4, @title = @Html.ToolTipMessageFor(m => m.YEARSP) })
            </div>
        </div>
    </div>
    <div class="col-md-6">
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Số CMND</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                @Html.TextBoxFor(model => model.SPOUSES_IDCARD_NUM, new { @class = "form-control ", MaxLength = 12, @title = @Html.ToolTipMessageFor(m => m.SPOUSES_IDCARD_NUM) })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Quốc tịch</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                <select class="SPOUSES_COUNTRY_ID form-control"></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Dân tộc</label>
            <div class="col-md-7 col-sm-8 col-xs-7 col-sm-8 col-xs-7">
                <select class="SPOUSES_ETHNIC_ID form-control "></select>
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5">Nơi ĐK khai sinh</label>
            <div class="col-md-7 col-sm-8 col-xs-7">
                @Html.DropDownList("TINHSP", ViewData["DISTRICT_CODE"] as List<SelectListItem>, new { @class = "form-control ", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Tỉnh." })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5"></label>
            <div class="col-md-7 col-sm-8 col-xs-7">
                @Html.DropDownList("HUYENSP", new SelectList(string.Empty, "Value", "Text"), new { @class = "form-control", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Huyện." })
            </div>
        </div>
        <div class="form-group">
            <label class="control-label col-md-5 col-sm-4 col-xs-5"></label>
            <div class="col-md-7 col-sm-8 col-xs-7">
                @Html.DropDownList("XASP", new SelectList(string.Empty, "Value", "Text"), new { @class = "form-control", title = "Đơn vị hành chính 'Nơi đăng ký khai sinh' - Cấp Xã." })
            </div>
        </div>
    </div>

</div>
<div class=" row margin-top-20">
    <div style="text-align:center; margin-top:30px;">
        <button class="btn btn-sm" id="btnBack" style="background-color: #2664B7; color:#ffffff; min-width:100px;"><i class="fa fa-angle-double-left"></i> Quay lại</button>
        <button class="btn btn-sm" id="btnNext" style="background-color: #2664B7; color:#ffffff; min-width:100px;">Tiếp tục <i class="fa fa-angle-double-right"></i></button>
    </div>
</div>